package com.NetWork.Decoder;

import com.NetWork.PlayerStatus.PlayerStatus;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageDecoder;

import java.util.List;

public class PlayerDecoder extends MessageToMessageDecoder<String> {
    @Override
    protected void decode(ChannelHandlerContext channelHandlerContext, String s, List<Object> list) throws Exception {

       list.add(JsonDecoder.jsonToPojo(s, PlayerStatus.class));
    }
}
